package homework.test5;

import java.util.List;

/*
static <E>  List<E>  of(E…elements)  创建一个具有指定元素的List集合对象
static <E>  Set<E>  of(E…elements)    创建一个具有指定元素的Set集合对象
static <K , V>   Map<K，V>  of(E…elements) 创建一个具有指定元素的Map集合对象
 */
public class Demo5 {
    public static void main(String[] args) {

        /*
        List<String> list1 = List.of("a","b","c","d");
        sout(list1);
        ArrayList<String> list4 = new ArrayList<>(List.of("a","b","c","d"));

        Set<String> list2 = Set.of("a","b","c","d");
        sout(list2);

        Map<String,String> list3 = Map.of("zhangsan",23,"lisi",24,"wangwu",23);
        Map<String,String> list5 = Map.ofEntries(
            Map.Entry("zhangsan",23),
            Map.Entry("lisi",24));
         */
    }
}
